package cn.anline.ann.auto_hid_control.service

import android.app.Service
import android.content.Intent
import android.os.IBinder
import io.reactivex.rxjava3.core.Flowable
import java.util.concurrent.TimeUnit

class AutoHIDSenderService : Service() {

    private var t = 0

    override fun onCreate() {
        super.onCreate()
        Flowable.interval(5, TimeUnit.SECONDS)
            .subscribe {
                t += 1
                println("AutoHIDSenderService times is ${t}")
            }
    }

    override fun onBind(intent: Intent): IBinder? {
        println("AutoHIDSenderService onBind")
        return null
    }

    override fun onDestroy() {
        super.onDestroy()
        println("AutoHIDSenderService onDestroy")
    }
}